﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using ArcFaceSDK.Entity;

namespace 图书管理系统
{
    internal static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            AdministratorsForm administratorsForm = new AdministratorsForm();
            PublicUserForm publicUserForm = new PublicUserForm();
            Utils.Engine.InitEngines();
            LoginForm loginform = new LoginForm();
            if (loginform.ShowDialog() == DialogResult.OK)
            {
                switch (loginform.mode)
                {
                    case 0:
                        administratorsForm.Uid = loginform.Uid;
                        Application.Run(administratorsForm);
                        break;
                    case 1:
                        publicUserForm.Uid = loginform.Uid;
                        Application.Run(publicUserForm);
                        break;
                }
            }
        }
    }
}
